package sample.factory.abstractFactory;

public abstract class DaoFactory{
	protected abstract Dao getDao();

	public static DaoFactory getInstance(String className){
		DaoFactory factory = null;
		try{
			factory = (DaoFactory)Class.forName(className).newInstance();
		}
		catch(InstantiationException e){
			e.printStackTrace();
		}
		catch(IllegalAccessException e){
			e.printStackTrace();
		}
		catch(ClassNotFoundException e){
			e.printStackTrace();
		}
		return factory;
	}
}
